package com.xinchao.ck_mips.utils.download;

/**
 * Created by zhangbw on 2018/9/28.
 */

public class MultiThreadBean {

    public static final int DOWNLOADINIT = -2;//初始化
    public static final int DOWNLOADING = 0;//下载中
    public static final int DOWNLOADFAILED = -1;//下载失败
    public static final int DOWNLOADED = 1;//下载完成

    public String mUrl;//下载的url
    public String mLocalFileName;//存储地在
    public boolean isCheckPoint;//是否断点续传
    public int mTotalSize;//总共下载数
    public int mCurrentIndex;//当道下载索引
    public long fileDownloadedLength;//已经下载大小
    public long fileTotalLength;//文件总大小
    public int downloadStatus = DOWNLOADINIT;//下载状态
    public int retryCount;//重试次数
    public Object tag;

    public MultiThreadBean(String url, String localFileName) {
        mUrl = url;
        this.mLocalFileName = localFileName;
    }

    public MultiThreadBean(String url, String localFileName, Object tag) {
        mUrl = url;
        mLocalFileName = localFileName;
        this.tag = tag;
    }

    public MultiThreadBean(String url, String localFileName, boolean isCheckPoint) {
        mUrl = url;
        this.mLocalFileName = localFileName;
        this.isCheckPoint = isCheckPoint;
    }
}
